import React from 'react'
import ReactDOM from 'react-dom'
import { NavLink, Route, Switch } from 'react-router-dom'
import { BrowserRouter } from 'react-router-dom'
import routes, { makeNavLinks, makeRoutes } from './routes'

function App() {
  return (
    <BrowserRouter>
      <div className="container d-flex justify-content-between mt-3">
        <div style={{ width: '200px' }}>
          {makeNavLinks(routes)}
        </div>
        <div style={{ flex: 1 }}>
          <Switch>{ makeRoutes(routes) }</Switch>
        </div>
      </div>
    </BrowserRouter>
  )
}

ReactDOM.render(
  <React.StrictMode>
    <App />
  </React.StrictMode>,
  document.getElementById('root')
)